module.exports = app => {
  const mongoose = require('mongoose')
  const db = mongoose.connection
  require('../models/User')
  require('../models/Category')
  require('../models/ServiceProduct')
  mongoose.connect('mongodb://wxpi:wxpi123@127.0.0.1/admin', {
    useNewUrlParser: true,
    useFindAndModify: false
  })
  db.on('open', () => {
    console.log('database connect success')
  })
}